package com.ouc.dataMange.service.impl;

import java.util.List;
import com.ouc.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ouc.dataMange.mapper.SysMysqlBackupMapper;
import com.ouc.dataMange.domain.SysMysqlBackup;
import com.ouc.dataMange.service.ISysMysqlBackupService;

/**
 * mysqlBackupService业务层处理
 * 
 * @author ouc
 * @date 2025-07-25
 */
@Service
public class SysMysqlBackupServiceImpl implements ISysMysqlBackupService 
{
    @Autowired
    private SysMysqlBackupMapper sysMysqlBackupMapper;

    /**
     * 查询mysqlBackup
     * 
     * @param backupId mysqlBackup主键
     * @return mysqlBackup
     */
    @Override
    public SysMysqlBackup selectSysMysqlBackupByBackupId(Integer backupId)
    {
        return sysMysqlBackupMapper.selectSysMysqlBackupByBackupId(backupId);
    }

    /**
     * 查询mysqlBackup列表
     * 
     * @param sysMysqlBackup mysqlBackup
     * @return mysqlBackup
     */
    @Override
    public List<SysMysqlBackup> selectSysMysqlBackupList(SysMysqlBackup sysMysqlBackup)
    {
        return sysMysqlBackupMapper.selectSysMysqlBackupList(sysMysqlBackup);
    }

    /**
     * 新增mysqlBackup
     * 
     * @param sysMysqlBackup mysqlBackup
     * @return 结果
     */
    @Override
    public int insertSysMysqlBackup(SysMysqlBackup sysMysqlBackup)
    {
        sysMysqlBackup.setCreateTime(DateUtils.getNowDate());
        return sysMysqlBackupMapper.insertSysMysqlBackup(sysMysqlBackup);
    }

    /**
     * 修改mysqlBackup
     * 
     * @param sysMysqlBackup mysqlBackup
     * @return 结果
     */
    @Override
    public int updateSysMysqlBackup(SysMysqlBackup sysMysqlBackup)
    {
        return sysMysqlBackupMapper.updateSysMysqlBackup(sysMysqlBackup);
    }

    /**
     * 批量删除mysqlBackup
     * 
     * @param backupIds 需要删除的mysqlBackup主键
     * @return 结果
     */
    @Override
    public int deleteSysMysqlBackupByBackupIds(Integer[] backupIds)
    {
        return sysMysqlBackupMapper.deleteSysMysqlBackupByBackupIds(backupIds);
    }

    /**
     * 删除mysqlBackup信息
     * 
     * @param backupId mysqlBackup主键
     * @return 结果
     */
    @Override
    public int deleteSysMysqlBackupByBackupId(Integer backupId)
    {
        return sysMysqlBackupMapper.deleteSysMysqlBackupByBackupId(backupId);
    }
}
